package networkcommunicationTCP_IP;

import java.net.InetAddress;

public class TcpTest {
	public static void main(String[] args) {
		InetAddress man;
		try {
			man=InetAddress.getLocalHost();
			String ip=man.getHostAddress();
			String compName=man.getHostName();
			System.out.println(ip);
			System.out.println(compName);
		}catch(Exception e) {
			e.printStackTrace();
		}
	}
	
}
